<template>
    <svg class="icon" aria-hidden="true" :id="id">
        <use :xlink:href="'#'+element.data[0]"></use>
    </svg>
</template>

<script>
import register from '@/js/main/register.js';

export default {
    props: {
        element: {
            type: Object
        },
        id: {
            type: String
        }
    },
    created() {
        register.addComponent(this);
    },
    destroyed() {
        register.removeComponent(this);
    }
};
</script>

<style lang='scss' scoped>
.icon {
    fill: #ffffff;
}
</style>